#!/bin/bash
####################################################################
# Prey System Module Core Functions - by Tomas Pollak (bootlog.org)
# URL: http://preyproject.com
# License: GPLv3
####################################################################

scan_system_hardware(){

	get_system_ids 2> /dev/null
	if [ "$os" != "mac" ]; then
		get_mb_info 2> /dev/null
	fi
	get_cpu_info 2> /dev/null
	get_memory_info 2> /dev/null
	get_bios_info 2> /dev/null
	# get_hdd_info 2> /dev/null

}

parse_hardware_params(){
	for var in `echo "$system__vars"`; do
		echo -n "device[hardware_attributes][$var]=`eval echo $\`echo $var\``&"
	done
}

send_updated_hardware_data(){

	system_params=`parse_hardware_params`
	update_device_info_with "$system_params"

}
